Why is my 'char' variable not printing an output